import request from '@/utils/request'
import { ParamArr } from '../../public/js/paramarr'

// 节假日方案数据
export function getHolidayList() {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'GetHolidayList',
    vPar: new ParamArr()
  })
}

// 流程任务
export function setAgentTaskEnable(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'SetAgentTaskEnable',
    vPar
  })
}

export function outPutAgentData(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'OutPutAgentData',
    vPar
  })
}

export function getTaskListByTaskID(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'GetTaskListByTaskID',
    vPar
  })
}

export function delTaskInfo(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'DelTaskInfo',
    vPar
  })
}

// 获取任务配置信息
export function getTaskInfo(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'GetTaskInfo',
    vPar
  })
}
// 获取任务配置左侧树
export function getWebTaskList(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'GetWebTaskList',
    vPar
  })
}
// 任务配置日历初始化
export function getWebTaskInfoList(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'GetWebTaskInfoList',
    vPar
  })
}
// 任务配置日历初始化
export function getHolidayInfo(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'GetHolidayInfo',
    vPar
  })
}
// 增加日历
export function newHoliday(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'NewHoliday',
    vPar
  })
}
// 删除日历
export function delHoliday(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'DelHoliday',
    vPar
  })
}
// 修改日历
export function setHoliday(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'SetHoliday',
    vPar
  })
}
// 立即生效日历
export function postHoliday(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'PostHoliday',
    vPar
  })
}
export function getFutureCalendar(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'GetFutureCalendar',
    vPar
  })
}
export function addFutureCalendar(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'AddFutureCalendar',
    vPar
  })
}
export function deleteFutureCalendarByID(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'DeleteFutureCalendarByID',
    vPar
  })
}
export function updateFutureCalendarByID(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'UpdateFutureCalendarByID',
    vPar
  })
}
export function inputHoliday(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'InputHoliday',
    vPar
  })
}
export function inputHolidayCsv(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'InputHolidayCsv',
    vPar
  })
}
export function setHolidayType(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'SetHolidayType',
    vPar
  })
}
export function turnCalendar(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'TurnCalendar',
    vPar
  })
}

export function setTaskEnableByFlow(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'SetTaskEnableByFlow',
    vPar
  })
}

export function getWebTaskByDate(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'GetWebTaskByDate',
    vPar
  })
}
// 日历配置弹窗数据保存
export function setTaskInfo(vPar) {
  return request({
    dmName: 'TSchedulerDM',
    lpName: 'SetTaskInfo',
    vPar
  })
}
